<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// ------------------------------------------------------------------------

/**
 * Home controller class
 *
 * This class is repsonsible for content on the front page.
 *
 * @package		AchieveIt
 * @subpackage	Controllers
 * @category	Controllers
 * @author		Russ
 */
class Home extends CI_Controller {
	
	/**
	 * Serves the profile page
	 *
	 * @access	public
	 */
	public function index()
	{	
		/* Check if user is logged in, if so redirect to profile*/
		$this->load->helper('login_authorization_helper');
		if(isLoggedIn($this->session->all_userdata()))
		{
			redirect('/profile');
		}
        $this->data['title'] = "Home";
		if($this->session->flashdata('notice') != '')
			$this->data['notice'] = $this->session->flashdata('notice');
        $this->load->view('header');
        $this->parser->parse("home.tpl", $this->data);
	}
	
}
?>